home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / sml_nj / 93src.lha / src / basics / stamps.sig < prev    next >
Encoding:
Text File  |  1993-01-27  |  1020 b   |  44 lines

  1. (* Copyright 1990 by AT&T Bell Laboratories *)
  2. (* stamps.sig *)
  3.  
  4. signature STAMPS =
  5. sig
  6.  
  7.   eqtype stamp
  8.   type scope
  9.   type 'a stampMap
  10.  
  11.   val freeScope : scope
  12.   val newBoundScope : unit -> scope
  13.   val newStamp : scope -> unit -> stamp
  14.  
  15.   (* newGenStamp: create a generative stamp, which when imported
  16.      is guaranteed to be different from other stamps.  Used to
  17.      create stamps for signatures.*)
  18.  
  19.   val newGenStamp : scope -> unit -> stamp
  20.  
  21.   val isBound : scope -> stamp -> bool
  22.   val less : stamp * stamp -> bool
  23.   val greater : stamp * stamp -> bool
  24.  
  25.   (* for convenience ... *)
  26.   val newFree : unit -> stamp
  27.   
  28.   val error : stamp
  29.   val null : stamp
  30.  
  31.   (* stamp maps should be changed to take the scope as an argument also.*)
  32.  
  33.   val newMap : exn -> '1a stampMap
  34.  
  35.   (* updateMap - add mapping to a stampMap *)
  36.   val updateMap : '2a stampMap -> stamp * '2a -> unit
  37.  
  38.   (* applyMap - apply stampMap to a stamp *)
  39.   val applyMap : 'a stampMap * stamp -> 'a
  40.  
  41.   val stampToString : stamp -> string
  42.  
  43. end (* STAMPS *)
  44.